import Vue from 'vue';
import Router from 'vue-router';
import Home from './views/Chat_list.vue';

Vue.use(Router);
Router.prototype.back = false;
Router.prototype.goBack = function () {
      this.back = true;
      this.go(-1)
};
export default new Router({
  
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/About.vue'),
    },
    {
      path: '/space',
      name: 'space',
      component: () => import('./views/Space.vue'),
    },
    {
      path: '/friend_list',
      name: 'friend_list',
      component: () => import('./views/Friend_list.vue'),
    },
    {
      path: '/chat_list',
      name: 'chat_list',
      component: () => import('./views/Chat_list.vue'),
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('./views/Login.vue'),
    },
    {
      path: '/Account',
      name: 'Account',
      component: () => import('./views/Account.vue'),
    },
    {
      path: '/MyData',
      name: 'MyData',
      component: () => import('./views/MyData.vue'),
    },
    {
      path: '/FriendCard',
      name: 'FriendCard',
      component: () => import('./views/FriendCard.vue'),
    },
    {
      path: '/Chat',
      name: 'Chat',
      component: () => import('./views/Chat.vue'),
    },
    {
      path: '/FriendEdit',
      name: 'FriendEdit',
      component: () => import('./views/FriendEdit.vue'),
    },
    {
      path: '/AddFriend',
      name: 'AddFriend',
      component: () => import('./views/AddFriend.vue'),
    },
    {
      path: '/GroupAdmin',
      name: 'GroupAdmin',
      component: () => import('./views/GroupAdmin.vue'),
    },
    {
      path: '/FriendPush',
      name: 'FriendPush',
      component: () => import('./views/FriendPush.vue'),
    },
    {
      path: '/AgreeFriendPush',
      name: 'AgreeFriendPush',
      component: () => import('./views/AgreeFriendPush.vue'),
    },
    {
      path: '/AddFriendPush',
      name: 'AddFriendPush',
      component: () => import('./views/AddFriendPush.vue'),
    },
    {
      path: '/TaskList',
      name: 'TaskList',
      component: () => import('./views/TaskList.vue'),
    },
    {
      path: '/ReleaseTask',
      name: 'ReleaseTask',
      component: () => import('./views/ReleaseTask.vue'),
    },
    {
      path: '/TaskData',
      name: 'TaskData',
      component: () => import('./views/TaskData.vue'),
    },
  ],
});
